home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 101 / 101.d81 / dominos 01 (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1992-01-01  |  7.5 KB  |  260 lines

  1. 1 poke55,0:poke56,128:clr
  2. 2 poke53281,0:poke53280,0:print"[147]":gosub60000
  3. 3 dv=peek(186):ifdv<8thendv=8
  4. 4 sys57812"ssx 01",dv,0:poke780,0:poke781,16:poke782,205:sys65493
  5. 5 sys57812"psbx 01",dv,0:poke780,0:poke781,0:poke782,48:sys65493
  6. 6 poke53272,29
  7. 7 dim m$(9),r$(4):f=0:ff=0:s=54272:gosub9900
  8. 8 sp$="  "
  9. 10 fori=1to5:readm$(i):next
  10. 11 data "[208]rint [208]uzzles         "
  11. 13 data "[208]rint [211]olutions       "
  12. 15 data "[210]ead [201]t               "
  13. 16 data "[195]redits               "
  14. 17 data "[204]oadstar              "
  15. 20 tp$="[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  16. 22 md$="[221][155]                                      [146][221]"
  17. 23 ln$="[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
  18. 24 bt$="[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  19. 25 goto30
  20. 26 print"[147]"tp$;
  21. 27 fori=1to23:printmd$;:next:printbt$:poke2023,125:poke56295,1
  22. 28 fori=217to242:pokei,peek(i)or128:next:return
  23. 30 gosub26
  24. 32 print"[221][156]               [196]ominos                [146][221]";
  25. 34 println$;
  26. 60 poke214,21:print
  27. 65 println$;
  28. 70 print"[221][154]   [213]se cursor keys/[210][197][212][213][210][206] to select   [146][221]";
  29. 80 gosub28
  30. 100 print"";
  31. 102 printtab(7)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  32. 104 qq$="[221]                        [221]"
  33. 105 fori=1to7:print""qq$:next
  34. 106 printtab(7)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  35. 107 poke214,5:print
  36. 109 fori=1to5:printtab(9)""m$(i):next
  37. 145 sys52496,6
  38. 146 poke198,0
  39. 150 r=5:m=1:poke214,r:print:printtab(9)"[154]"m$(m):m1=m:r1=r
  40. 155 getk$:ifk$=""then155
  41. 160 ifk$=chr$(13)thengosub9930:goto200
  42. 165 ifk$="[145]"thenm=m-1:r=r-1:ifm<1thenm=5:r=9
  43. 170 ifk$=""thenm=m+1:r=r+1:ifm>5thenm=1:r=5
  44. 175 ifm<>m1thenpoke214,r1:print:printtab(9)""m$(m1):gosub9910
  45. 180 poke214,r:print:printtab(9)"[154]"m$(m)
  46. 182 m1=m:r1=r
  47. 185 goto155
  48. 190 :
  49. 200 onmgoto1000,2000,12000,500,11000
  50. 205 goto150
  51. 500 sys52496,7
  52. 525 poke214,15:print:printtab(7)"[159][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  53. 527 printtab(7)"[221]  [208]uzzle [194]y [197]d [198]ournier [221]"
  54. 535 printtab(7)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  55. 544 t=1
  56. 545 getk$:ifk$<>""then550
  57. 546 t=t+1:ift<100then545
  58. 550 sys52499,7:gosub28:goto155
  59. 555 :
  60. 1000 gosub9000:ifppthen155
  61. 1005 gosub6000
  62. 1007 open4,4
  63. 1010 print#4,sp$;"puzzle #1: easy sixes"
  64. 1015 print#4
  65. 1016 print#4,sp$;"pairs: 0/0  4/0  4/1  4/2  4/3  4/4"
  66. 1019 print#4
  67. 1020 print#4,sp$;" -- --  -- --"
  68. 1021 print#4,sp$;":  /  ::  /  :  6"
  69. 1022 print#4,sp$;" -- --  -- --"
  70. 1024 print#4,sp$;":  /  ::  /  : 13"
  71. 1025 print#4,sp$;" -- --  -- --"
  72. 1027 print#4,sp$;":  /  ::  /  : 11"
  73. 1028 print#4,sp$;" -- --  -- --"
  74. 1035 print#4,sp$;"  8  4  11  7"
  75. 1040 print#4
  76. 1110 print#4,sp$;"puzzle #2: elusive eights"
  77. 1115 print#4
  78. 1116 print#4,sp$;"pairs: 0/0  4/0  4/1  4/2  4/3  4/4  4/5  4/6"
  79. 1119 print#4
  80. 1120 print#4,sp$;" -- --  -- --"
  81. 1121 print#4,sp$;":  /  ::  /  : 19"
  82. 1122 print#4,sp$;" -- --  -- --"
  83. 1124 print#4,sp$;":  /  ::  /  : 12"
  84. 1125 print#4,sp$;" -- --  -- --"
  85. 1127 print#4,sp$;":  /  ::  /  :  8"
  86. 1128 print#4,sp$;" -- --  -- --"
  87. 1129 print#4,sp$;":  /  ::  /  : 10"
  88. 1130 print#4,sp$;" -- --  -- --"
  89. 1135 print#4,sp$;" 17  9  11 12"
  90. 1140 print#4
  91. 1210 print#4,sp$;"puzzle #3: dirty dozen"
  92. 1215 print#4
  93. 1216 print#4,sp$;"pairs: 0/0  4/0  4/1  4/2  4/3  4/4  4/5  4/6  ";
  94. 1217 print#4,"5/1  5/2  5/3  5/6"
  95. 1219 print#4
  96. 1220 print#4,sp$;" -- --  -- --  -- --"
  97. 1221 print#4,sp$;":  /  ::  /  ::  /  : 25"
  98. 1222 print#4,sp$;" -- --  -- --  -- --"
  99. 1224 print#4,sp$;":  /  ::  /  ::  /  : 23"
  100. 1225 print#4,sp$;" -- --  -- --  -- --"
  101. 1227 print#4,sp$;":  /  ::  /  ::  /  : 15"
  102. 1228 print#4,sp$;" -- --  -- --  -- --"
  103. 1229 print#4,sp$;":  /  ::  /  ::  /  : 18"
  104. 1230 print#4,sp$;" -- --  -- --  -- --"
  105. 1235 print#4,sp$;" 17  9  14  9  11 21"
  106. 1240 print#4
  107. 1310 print#4,sp$;"puzzle #4: frantic fifteens"
  108. 1315 print#4
  109. 1316 print#4,sp$;"pairs: 0/0 4/0 4/1 4/2 4/3 4/4 4/5 4/6 ";
  110. 1317 print#4,"5/1 5/2 5/3 5/6 5/0 5/5 1/0"
  111. 1319 print#4
  112. 1320 print#4,sp$;" -- --  -- --  -- --"
  113. 1321 print#4,sp$;":  /  ::  /  ::  /  : 19"
  114. 1322 print#4,sp$;" -- --  -- --  -- --"
  115. 1324 print#4,sp$;":  /  ::  /  ::  /  : 11"
  116. 1325 print#4,sp$;" -- --  -- --  -- --"
  117. 1327 print#4,sp$;":  /  ::  /  ::  /  : 24"
  118. 1328 print#4,sp$;" -- --  -- --  -- --"
  119. 1329 print#4,sp$;":  /  ::  /  ::  /  : 14"
  120. 1330 print#4,sp$;" -- --  -- --  -- --"
  121. 1331 print#4,sp$;":  /  ::  /  ::  /  : 29"
  122. 1332 print#4,sp$;" -- --  -- --  -- --"
  123. 1335 print#4,sp$;"  9 18  21 16  16 17"
  124. 1500 print#4:close4:goto155
  125. 1505 :
  126. 2000 gosub9000:ifppthen155
  127. 2005 gosub6000
  128. 2007 open4,4
  129. 2010 print#4,sp$;"puzzle #1: easy sixes"
  130. 2015 print#4
  131. 2016 print#4,sp$;"pairs: 0/0  4/0  4/1  4/2  4/3  4/4"
  132. 2019 print#4
  133. 2020 print#4,sp$;" -- --  -- --"
  134. 2021 print#4,sp$;": 0/0 :: 4/2 :  6"
  135. 2022 print#4,sp$;" -- --  -- --"
  136. 2024 print#4,sp$;": 4/4 :: 4/1 : 13"
  137. 2025 print#4,sp$;" -- --  -- --"
  138. 2027 print#4,sp$;": 4/0 :: 3/4 : 11"
  139. 2028 print#4,sp$;" -- --  -- --"
  140. 2035 print#4,sp$;"  8  4  11  7"
  141. 2040 print#4
  142. 2110 print#4,sp$;"puzzle #2: elusive eights"
  143. 2115 print#4
  144. 2116 print#4,sp$;"pairs: 0/0  4/0  4/1  4/2  4/3  4/4  4/5  4/6"
  145. 2119 print#4
  146. 2120 print#4,sp$;" -- --  -- --"
  147. 2121 print#4,sp$;": 5/4 :: 4/6 : 19"
  148. 2122 print#4,sp$;" -- --  -- --"
  149. 2124 print#4,sp$;": 4/1 :: 3/4 : 12"
  150. 2125 print#4,sp$;" -- --  -- --"
  151. 2127 print#4,sp$;": 4/4 :: 0/0 :  8"
  152. 2128 print#4,sp$;" -- --  -- --"
  153. 2129 print#4,sp$;": 4/0 :: 4/2 : 10"
  154. 2130 print#4,sp$;" -- --  -- --"
  155. 2135 print#4,sp$;" 17  9  11 12"
  156. 2140 print#4
  157. 2210 print#4,sp$;"puzzle #3: dirty dozen"
  158. 2215 print#4
  159. 2216 print#4,sp$;"pairs: 0/0  4/0  4/1  4/2  4/3  4/4  4/5  4/6  ";
  160. 2217 print#4,"5/1  5/2  5/3  5/6"
  161. 2219 print#4
  162. 2220 print#4,sp$;" -- --  -- --  -- --"
  163. 2221 print#4,sp$;": 5/4 :: 6/4 :: 1/5 : 25"
  164. 2222 print#4,sp$;" -- --  -- --  -- --"
  165. 2224 print#4,sp$;": 4/1 :: 4/3 :: 5/6 : 23"
  166. 2225 print#4,sp$;" -- --  -- --  -- --"
  167. 2227 print#4,sp$;": 4/4 :: 0/0 :: 2/5 : 15"
  168. 2228 print#4,sp$;" -- --  -- --  -- --"
  169. 2229 print#4,sp$;": 4/0 :: 4/2 :: 3/5 : 18"
  170. 2230 print#4,sp$;" -- --  -- --  -- --"
  171. 2235 print#4,sp$;" 17  9  14  9  11 21"
  172. 2240 print#4
  173. 2310 print#4,sp$;"puzzle #4: frantic fifteens"
  174. 2315 print#4
  175. 2316 print#4,sp$;"pairs: 0/0 4/0 4/1 4/2 4/3 4/4 4/5 4/6 ";
  176. 2317 print#4,"5/1 5/2 5/3 5/6 5/0 5/5 1/0"
  177. 2319 print#4
  178. 2320 print#4,sp$;" -- --  -- --  -- --"
  179. 2321 print#4,sp$;": 1/4 :: 5/3 :: 4/2 : 19"
  180. 2322 print#4,sp$;" -- --  -- --  -- --"
  181. 2324 print#4,sp$;": 1/5 :: 0/0 :: 0/5 : 11"
  182. 2325 print#4,sp$;" -- --  -- --  -- --"
  183. 2327 print#4,sp$;": 2/5 :: 5/5 :: 3/4 : 24"
  184. 2328 print#4,sp$;" -- --  -- --  -- --"
  185. 2329 print#4,sp$;": 1/0 :: 5/4 :: 4/0 : 14"
  186. 2330 print#4,sp$;" -- --  -- --  -- --"
  187. 2331 print#4,sp$;": 4/4 :: 6/4 :: 5/6 : 29"
  188. 2332 print#4,sp$;" -- --  -- --  -- --"
  189. 2335 print#4,sp$;"  9 18  21 16  16 17"
  190. 2500 print#4:close4:goto155
  191. 2505 :
  192. 6000 open4,4
  193. 6005 print#4, "  #101 - dominos"
  194. 6010 print#4:close4:return
  195. 9000 sys52496,7:pp=1
  196. 9005 poke214,15:print:printtab(7)"[159][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  197. 9010 printtab(7)"[221]  [208]rinter [210]eady? [y/n]  [221]"
  198. 9025 printtab(7)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  199. 9035 getk$:ifk$=""then9035
  200. 9036 ifk$="y"thenpp=0
  201. 9040 sys52499,7:gosub28:return
  202. 9045 :
  203. 9800 poke214,21:print:println$;
  204. 9805 print"[221][154]             [208]ress [210][197][212][213][210][206]             [146][221]";
  205. 9810 getk$:ifk$<>chr$(13)then9810
  206. 9815 return
  207. 9820 :
  208. 9900 fori=0to24:pokes+i,.:next:return
  209. 9910 pokes+24,15:pokes+5,9:pokes+6,0
  210. 9915 pokes+1,19:pokes,63:pokes+4,17
  211. 9920 fort=1to50:next:pokes+4,16:return
  212. 9930 pokes+24,15:pokes+5,9:pokes+6,0
  213. 9935 pokes+1,48:pokes,0:pokes+4,17
  214. 9940 fort=1to50:next:pokes+4,16:return
  215. 10000 open15,8,15,"s0:dominos 01":close15:save"0:dominos 01",8:end
  216. 11000 poke214,15:print
  217. 11005 printtab(7)"[150][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  218. 11015 printtab(7)"[221]  [193]re you sure?  [y/n]  [221]"
  219. 11025 printtab(7)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  220. 11030 getk$:ifk$=""then11030
  221. 11035 ifk$<>"y"thensys52499,6:goto150
  222. 11037 print"[147]":poke53272,23
  223. 11050 gosub30000
  224. 12000 sys52496,7
  225. 12001 gosub26
  226. 12005 print"[221][156]               [196]ominos                [146][221]";
  227. 12010 println$;
  228. 12015 print"[155]   [201]nsert the dominos (number pairs)
  229. 12020 [153]"list horizontally into the spaces
  230. 12025 print"[155] provided so that the numbers will
  231. 12030 [153]"list add up to the given totals both
  232. 12065 print"[155] horizontally and vertically.  [213]se
  233. 12070 [153]"list each number pair once.  (NULL)he numbers
  234. 12075 print"[155] may not be separated but may be
  235. 12080 [153]"list reversed (i.e. 4/1 may be 1/4).
  236. 12085 print"[155]   [208]lease align your paper at the
  237. 12090 [153]"list very top.
  238. 12100 gosub9800
  239. 12105 sys52499,7:gosub28:goto155
  240. 30000 fori=8to9:open15,i,15:poke781,15:sys65481:sys65484:ifst then30030
  241. 30010 print#15,"r0:hello connect=hello connect":input#15,er:close15
  242. 30020 ifer=63thendv=i:i=9:next:goto30040
  243. 30030 next:poke2048,0:poke44,8:print"[147]":end
  244. 30040 poke646,peek(53281):print"[147]load"chr$(34)"hello connect"chr$(34)","dv
  245. 30050 print"run"
  246. 30060 poke43,1:poke44,8:poke2048,0
  247. 30070 poke631,13:poke632,13:poke198,2:end
  248. 40000 sys57812"psbx 01",dv,0:poke780,0:poke781,0:poke782,48:sys65493
  249. 60000 print"[147]":z$=" [152]                                      ":poke214,10:print
  250. 60010 print" [155][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]":fori=0to11:printz$:next
  251. 60020 print" [151][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][152]"
  252. 60030 z$(0)="[196] [207] [205] [201] [206] [207] [211]":z$(1)="by [197]d [198]ournier"
  253. 60040 z$(2)="[214]1.0 ([195]) 1992 by [211]oftdisk, [201]nc."+chr$(13)
  254. 60050 z$(3)="[212]his program is the copyrighted work
  255. 60060 z$(4)[178]"of (NULL)(NULL)asc(NULL)str$right$(NULL)(NULL) (NULL)(NULL)peek(NULL)right$(NULL)left$right$(NULL)chr$.  right$t is not"
  256. 60070 z$(5)[178]"shareware or in the public domain."
  257. 60080 z$(6)[178]"(NULL)eport illegal distribution of":z$(7)[178]"this program by calling"
  258. 60090 z$(8)[178]"1-800-831-2694 or 1-318-221-8718.":[151]214,12:[153]
  259. 60100 [129]i[178]0[164]8:[153][163]20[171]([195](z$(i))[173]2))""z$(i):[130]:[142]
  260.